import $service from '../../../service.js';
var id;
const app = getApp();
Page({
	data: {
		init_key:'',
		name:''
	},
	onLoad: function(e) {
        this.getPrivacyPolicy(e.type)
	},
	getPrivacyPolicy(type) {
		app.http.getAgreement({id: type}).then(res => {
			this.setData({
				init_key: res.data.initKey.replace(/strong/g, 'h4'),
				name: res.data.initName
			})
		}).catch(err => {
			$service.showToast(err.msg)
		})
	},
})
